2 using System.Collections.Generic;
5 using Microsoft.Xna.Framework;
6 using Microsoft.Xna.Framework.Graphics;
8 namespace SuperPolarity
12 protected ParticleEngine particleEngine;
14 public Bullet(Game newGame)
21 particleEngine = null;
24 public override void Initialize(Texture2D texture, Vector2 position)
26 base.Initialize(texture, position);
27 particleEngine = ParticleEffectFactory.CreateBullet(position);
30 public override void Update(GameTime gameTime)
32 Velocity.X = (float)(MaxVelocity * Math.Cos(Angle));
33 Velocity.Y = (float)(MaxVelocity * Math.Sin(Angle));
37 particleEngine.Update();
38 particleEngine.EmitterLocation = Position;
41 public override void Draw(SpriteBatch spriteBatch)
43 base.Draw(spriteBatch);
44 particleEngine.Draw(spriteBatch);